b7ccf2e2505cffcf11025a3ef0f26e54e2abd7a5,src/org/opencms/i18n/CmsEncoder.java,CmsEncoder,convertHostToPunycode,#String#,176
Before Change
String authority = uri.getAuthority(); // getHost won't work when we have special characters
URI uriWithCorrectedHost = new URI(
uri.getScheme(),
IDN.toASCII(authority),
uri.getPath(),
uri.getQuery(),
uri.getFragment());
After Change
URI uri = new URI(uriString);
String authority = uri.getAuthority(); // getHost won't work when we have special characters
int colonPos = authority.indexOf(':');
if (colonPos >= 0) {
authority = IDN.toASCII(authority.substring(0, colonPos)) + authority.substring(colonPos);
} else {
authority = IDN.toASCII(authority);
}
URI uriWithCorrectedHost = new URI(
uri.getScheme(),